import type { PageParams } from './commonType'

export interface OrderItem {
  _id: string
  orderId: string //订单ID
  cityName: string
  userName: string
  mobile: number
  startAddress: string //下单开始地址
  endAddress: string //下单结束地址
  orderAmount: number //订单金额
  userPayAmount: number //支付金额
  driverAmount: number //支付金额
  // 1: 微信 2：支付宝
  payType: number //支付方式
  driverName: string //司机名称
  vehicleName: string //订单车型
  // 1: 进行中 2：已完成 3：超时 4：取消
  state: number // 订单状态
  route: Array<{ lng: string; lat: string }>
  // 用车时间
  useTime: Date
  // 订单结束时间
  endTime: Date
  createTime: string
  remark: string
}

export interface OrderSearchParams extends PageParams {
  orderId?: string
  userName?: string
  state?: number
}

export interface DictItem {
  id: number
  name: string
}

export interface OrderRoute {
  orderId: string //订单ID
  route: Array<{ lng: string; lat: string; id: number }>
}

export interface DriverItem {
  driverName: string
  driverId: number
  driverPhone: string
  cityName: string
  grade: boolean
  driverLevel: number
  accountStatus: 0 | 1 | 2 | 3 | 4
  carNo: string
  vehicleBrand: string
  vehicleName: string
  onlineTime: number
  driverAmount: number
  rating: number
  driverScore: number
  pushOrderCount: number
  orderCompleteCount: number
  createTime: string
}
